package com.geeksx.trainer.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.geeksx.trainer.entity.Question;
import com.geeksx.trainer.entity.vo.QuestionVO;
import com.geeksx.trainer.mapper.QuestionMapper;
import com.geeksx.trainer.service.QuestionService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 题目Service实现类
 */
@Service
@RequiredArgsConstructor
public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> implements QuestionService {
    
    private final QuestionMapper questionMapper;


    @Override
    public Page<QuestionVO> pageWithCategoryIds(Page<QuestionVO> page, String type, List<Long> categoryIds) {
        return questionMapper.selectQuestionPageWithCategoryIds(page, type, categoryIds);
    }
}